#!/usr/bin/env python

import sys
sys.path.insert(0,'../')
sys.path.insert(0,'../mall/apps')

import os
if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'mall.settings'

import django
django.setup()

from django.template import loader

from django.conf import settings

from utils.goods import get_categories
from goods.models import SKU

def generate_static_sku_detail_html(sku_id):

    categories = get_categories()

    sku = SKU.objects.get(id=sku_id)
    sku.images = sku.skuimage_set.all()

    goods = sku.goods

